Win2003, Apache2.2 & Tomcat6 Apache proxy to Tomcat
am 30.09.2010 22:29:53 von Mike Rea--0022150488a710cfc004917ff21c
Content-Type: text/plain; charset=ISO-8859-1
I am running a Win2003 server using Apache2.2 to basically just proxy to
Tomcat6 with SSL.
I had tried running just tomcat6 but from everything that I read it was
better for SSL traffic to proxy using Apache, so that is what i did.
Right now I am just pointing it to the Tomcat default page, that is easy
enough to change later.
Here is where I am at.
1. On the server if I go to http: //localhost: it brings up the page fine.
2. On the server https: //localhost also brings up the page fine. Of
course I do get a certificate error because the SSL cert is for my domain.
But it does work and the samples run fine.
3. From either the server or another PC, if I goto http: //my. domain.com
it works fine and brings up the Tomcat default page.
4. From either place going to https the browser says waiting and eventually
returns an error.
In my httpd.conf file I have:
Listen 80
Listen 443
The mod_proxy 's, mod_ssl & mod_vhost_alias are all turned on.
In my httpd-vhosts.conf file here is what I have:
NameVirtualHost *:80 (although on this try it isn't named, shows error in
the logs but doesnt seem to hurt anything)
NameVirtualHost *:443
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
ProxyPass / http: //localhost:8080/
ProxyPassReverse / http: //localhost:8080/
SSLEngine On
SSLProxyEngine on
SSLCertificateFile conf/ssl/certname.cer
SSLCertificateKeyFile conf/ssl/keyname.key
ProxyPass / httpa: //localhost:8443/
ProxyPassReverse / httpa: //localhost:8443/
ErrorLog "logs/mydomain.com-error.log"
CustomLog "logs/mydomain.com-access.log" common
I have tried several different rewrites on this and just not getting it to
work.
I did put the port 80 => 8080 pass in a VirtualHost tag, it works fine on
http: //localhost but when using https it gives some bogus message of the
server being too busy.
I took the 443 =>8443 directives out of the VirtualHost tag and that works
fine on http: //localhost but when using https it goes to the Apache
default page.
No matter what I do, I still get an error from http: //my. domain.com while
http: //my. domain.com runs fine.
Any ideas? I am definately not an expert with Apache setup. I am more a DB
& ERP system guy who has been writting more and more jsp apps.
Now I have one that I need to secure and having one heck of a time doing it.
(Sorry for the spaces. e-mail was seeing them as URLs and the listserv SPAM
filter was blocking the email)
Thanks in advance for any help.
Mike
--0022150488a710cfc004917ff21c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I am running a Win2003 server using Apache2.2 to basically just proxy to=
Tomcat6 with SSL.
=A0
I had tried running just tomcat6 but from ever=
ything that I read it was better for SSL traffic to proxy using Apache, so =
that is what i did.
=A0
Right now I am just pointing it to the Tomcat default page, that is =
easy enough to change later.
=A0
Here is where I am at.
=A0
1. =
On the server if I go to http: //localhost: it brings up the page fine.
=
2. On the server https: //localhost also brings up the page fine.=A0 =
Of course I do get a certificate error because the SSL cert is for my domai=
n.=A0 But it does work and the samples run fine.
=A0
3. From either the server or another PC, if I goto=A0http: //my.
href=3D"http://domain.com">domain.com it works fine and brings up=
the Tomcat default page.
4. From either place going to=A0https=A0 the b=
rowser says waiting and eventually returns an error.
=A0
In my httpd.conf file I have:
=A0
Listen 80
Listen 443
T=
he mod_proxy 's, mod_ssl & mod_vhost_alias are all turned on.
=
=A0
=A0
=A0
In my httpd-vhosts.conf file here is what I have:
=
=A0
NameVirtualHost *:80 (although on this try it isn't named, shows=
error in the logs but doesnt seem to hurt anything)
NameVirtualHost *:443
<IfModule ssl_module>
SSLRandomSeed start=
up builtin
SSLRandomSeed connect builtin
</IfModule>
ProxyPa=
ss / http: //localhost:8080/
ProxyPassReverse / http: //localhost:8080/<=
br>
<VirtualHost *:443>
=A0 SSLEngine On
=A0 SSLProxyEn=
gine on
=A0 SSLCertificateFile conf/ssl/certname.cer
=A0=
SSLCertificateKeyFile conf/ssl/keyname.key
ProxyPass / httpa: //localh=
ost:8443/
ProxyPassReverse / httpa: //localhost:8443/
=A0 ErrorLog "logs/mydomain.com-error.log"
=A0 Cu=
stomLog "logs/mydomain.com-access.log" common
</VirtualHost=
>
I have tried several different rewrites on this and just not ge=
tting it to work.
I did put the port 80 =3D> 8080 pass in a VirtualHo=
st tag, it works fine on http: //localhost=A0 but when using https it gives=
some bogus message of the server being too busy.
I took the 443 =3D>8443 directives out of the VirtualHost tag and that w=
orks fine on http: //localhost=A0 but when using https it goes to the Apach=
e default page.=A0
No matter what I do, I still get an error from http:=
//my. while http: //my. ef=3D"http://domain.com">domain.com runs fine.
=A0
Any ideas?=A0 I am definately not an expert with Apache setup.=A0 I =
am more a DB & ERP system guy who has been writting more and more jsp a=
pps.=A0
Now I have one that I need to secure and having one heck of a t=
ime doing it.
erv SPAM filter was blocking the email)
Thanks in advance for any help.<=
br>Mike
--0022150488a710cfc004917ff21c--